package create_thread;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/4/25
 * Time:19:57
 * 创建线程方法 1-2 -- 继承Thread类
 **/
public class Thread2 {
    public static void main(String[] args) {
        Thread thread = new Thread(){
            @Override
            public void run() {
                System.out.println("线程名称"+Thread.currentThread().getName());
            }
        };
        thread.start();
    }
}
